SELECT FORMSON_1101.FIELD0014 type,"SUM"(FORMSON_1101.FIELD0012) num FROM FORMSON_1101 
WHERE FORMSON_1101.FORMMAIN_ID = '${ID}' AND 
( FORMSON_1101.FIELD0010 > "TO_DATE"("CONCAT"("TO_CHAR"("ADD_MONTHS"("TRUNC"(SYSDATE), -1),'yyyy-MM'), '-26 00:00:00'), 'yyyy-mm-dd hh24:mi:ss') OR
FORMSON_1101.FIELD0011 < "TO_DATE"("CONCAT"("TO_CHAR"(SYSDATE,'yyyy-MM'), '-26 00:00:00'), 'yyyy-mm-dd hh24:mi:ss')  )
GROUP BY FORMSON_1101.FIELD0014